<?php


namespace App\Routes;


use Base\RouteInterface;
use FastRoute\RouteCollector;

class Mp1Route implements RouteInterface
{
    public static function handle(RouteCollector &$route)
    {
        $route->addGroup('/mp1', function (RouteCollector $route) {
            $route->get('/getSwipe', 'Mp1/Swipe/getSwipe');
            $route->get('/getVantAreaList', 'Mp1/Area/getVantAreaList');
            $route->addGroup('/qiniu', function (RouteCollector $route) {
                $route->get('/getUploadToken', 'Mp1/Qiniu/getToken');
            });
            $route->addGroup('/user', function (RouteCollector $route) {
                $route->post('/mpLogin', 'Mp1/User/mpLogin');
                $route->get('/getUserInfo', 'Mp1/User/getUserInfo');
                $route->get('/getUserDetail', 'Mp1/User/getUserDetail');
                $route->post('/setUserInfo', 'Mp1/User/setUserInfo');
                $route->get('/getUnreadMessageCount', 'Mp1/User/getUnreadMessageCount');
                # $route->post('/sendVCode', "Mp1/User/sendVCode");
                # $route->post('/bindPhone', "Mp1/User/bindPhone");
            });
            $route->addGroup('/give', function (RouteCollector $route) {
                $route->post('/sendGive', 'Mp1/Give/sendGive');
                $route->post('/editGive', 'Mp1/Give/editGive');
                $route->post('/sendHelp', 'Mp1/Give/sendHelp');
                $route->get('/getGiveList', 'Mp1/Give/getGiveList');
                $route->get('/getGiveDetail', 'Mp1/Give/getGiveDetail');
                $route->post('/deleteGive', 'Mp1/Give/deleteGive');
                $route->post('/wanna', 'Mp1/Give/wanna');

                $route->post('/verify', 'Mp1/Give/verify');
                $route->get('/getWannaList', 'Mp1/Give/getWannaList');
                $route->post('/given', 'Mp1/Give/given');
            });
            $route->addGroup('/comment', function (RouteCollector $route) {
                $route->post('/sendComment', 'Mp1/Comment/sendComment');
                $route->post('/deleteComment', 'Mp1/Comment/deleteComment');
                $route->get('/getCommentList', 'Mp1/Comment/getCommentList');
            });
            $route->addGroup('/message', function (RouteCollector $route) {
                $route->get('/getMyMessages', 'Mp1/Message/getMyMessages');
            });
        });
    }
}
